package com.pn.warehouse.service;

import com.pn.warehouse.entity.ProductType;
import com.pn.warehouse.entity.Result;

import java.util.List;

public interface ProductTypeService {

    //查询所有的商品分类，并转成分类树
    public List<ProductType> productTypeTree();

    //检查分类编码是否已经存在
    public Result findTypeByCodeOrName(String typeCode);

    //添加商品的分类
    public Result insertProductType(ProductType productType);

    //根据id或父级id删除分类
    public Result removeProductType(Integer typeId);

    //根据id修改分类
    public Result setProductTypeById(ProductType productType);

}
